package jsyf.oa.entity.system;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by Maqiuqiu on 2018/6/25.
 */
@Entity
@Table(name = "T_SYS_AUDIT_HISTORY", schema = "oa", catalog = "")
public class AuditHistoryEntity extends BaseEntity implements Serializable {

    private String mainId;
    private String auditorId;
    private String auditorName;
    private Date auditTime;
    private String auditAdvise;
    private Integer auditType;
    private String auditFlag;
    private String receivableIds;//应收申请的ids;

    public String getReceivableIds() {
        return receivableIds;
    }

    public void setReceivableIds(String receivableIds) {
        this.receivableIds = receivableIds;
    }

    public String getMainId() {
        return mainId;
    }

    public void setMainId(String mainId) {
        this.mainId = mainId;
    }

    public String getAuditorId() {
        return auditorId;
    }

    public void setAuditorId(String auditorId) {
        this.auditorId = auditorId;
    }

    public String getAuditorName() {
        return auditorName;
    }

    public void setAuditorName(String auditorName) {
        this.auditorName = auditorName;
    }

    public String getAuditFlag() {
        return auditFlag;
    }

    public void setAuditFlag(String auditFlag) {
        this.auditFlag = auditFlag;
    }


    public Date getAuditTime() {
        return auditTime;
    }

    public void setAuditTime(Date auditTime) {
        this.auditTime = auditTime;
    }

    public String getAuditAdvise() {
        return auditAdvise;
    }

    public void setAuditAdvise(String auditAdvise) {
        this.auditAdvise = auditAdvise;
    }

    public Integer getAuditType() {
        return auditType;
    }

    public void setAuditType(Integer auditType) {
        this.auditType = auditType;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject json = new JSONObject();
        json.put("ID", this.getId());
        json.put("MAIN_ID", this.getMainId());
        json.put("AUDITOR_ID", this.getAuditorId());
        json.put("AUDITOR_NAME", this.getAuditorName());
        json.put("AUDIT_TIME", this.getAuditTime());
        json.put("AUDIT_ADVISE", this.getAuditAdvise());
        json.put("AUDIT_FLAG", this.getAuditFlag());
        json.put("AUDIT_Type", this.getAuditType());
        json.put("RECEIVABLE_IDS", this.getReceivableIds());
        return json;
    }

    @Override
    public String getTableName() {
        return "T_SYS_AUDIT_HISTORY";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject json = new JSONObject();
        json.put("ID", "id");
        json.put("MAIN_ID", "mainId");
        json.put("AUDITOR_ID", "auditorId");
        json.put("AUDITOR_NAME", "auditorName");
        json.put("AUDIT_TIME", "auditTime");
        json.put("AUDIT_ADVISE", "auditAdvise");
        json.put("AUDIT_FLAG", "auditFlag");
        json.put("AUDIT_Type", "auditType");
        json.put("RECEIVABLE_IDS","receivableIds");

        return json;
    }
}
